/**
*@Author      ：anlzou
*@Date        ：8:06 2021/5/3
*@Github      ：https://github.com/anlzou
*@Description ：
*/
package com.anlzou.object;

public class Son extends Parent{
    private String name;

    static {
        System.out.println("this is son static space.");
    }

    public Son(){
        System.out.println("this is parent constructor");
    }

    public Son(String name) {
        this.name = name;
        System.out.println("this is parent constructor");
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Son{" +
                "name='" + name + '\'' +
                '}';
    }
}
